﻿<Page
    x:Class="GlobalizationExample.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:GlobalizationExample"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:system="using:System"
    mc:Ignorable="d">

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.Resources>
            <local:DateValueConverter x:Key="DateConverter"/>
        </Grid.Resources>
        <Grid.DataContext>
            <local:ViewModel/>
        </Grid.DataContext>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Image Grid.Row="0" Grid.Column="0" Source="Assets/Logo.png"/>
        <StackPanel Margin="10" Grid.Row="0" Grid.Column="1" Orientation="Vertical" HorizontalAlignment="Left">
            <TextBlock x:Uid="Header" Text="Placeholder"
                   Style="{StaticResource HeaderTextBlockStyle}"/>
            <TextBlock x:Uid="Subheader" Text="Placeholder" Style="{StaticResource SubheaderTextBlockStyle}"/>
        </StackPanel>
        <StackPanel Margin="10" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Vertical" HorizontalAlignment="Left">
            <Image Source="Images/flag.jpg" Width="300" Height="100"/>    
            <TextBlock x:Name="DynamicText" Style="{StaticResource SubheaderTextBlockStyle}" Text="Placeholder"/>
            <TextBlock x:Name="Currency" Style="{StaticResource SubheaderTextBlockStyle}" Text="Placeholder"/>
            <TextBlock x:Name="Date" Text="2/18/2014" Style="{StaticResource SubheaderTextBlockStyle}"/>
            <TextBlock x:Name="Time" Text="11:09 AM" Style="{StaticResource SubheaderTextBlockStyle}"/>  
            <DatePicker CalendarIdentifier="JapaneseCalendar" Margin="10"/>
            <TextBlock Text="{Binding Path=SimpleDate, Converter={StaticResource DateConverter}}"
                       Style="{StaticResource SubheaderTextBlockStyle}"/>
            <TextBlock Text="{Binding Path=SimpleDate, Converter={StaticResource DateConverter}, ConverterParameter='shortdate'}"
                       Style="{StaticResource SubheaderTextBlockStyle}"/>
            <TextBlock Text="{Binding Path=SimpleDate, Converter={StaticResource DateConverter}, ConverterLanguage='ar-sa'}"
                       Style="{StaticResource SubheaderTextBlockStyle}"/>
            <TextBlock Text="{Binding Path=FormattedNumber}" Style="{StaticResource SubheaderTextBlockStyle}"/>
        </StackPanel>
        
    </Grid>
</Page>
